// axios插件模块
import axios from 'axios'

const MyHttpServer = {}

MyHttpServer.install = (Vue) => {
// 4. 添加实例方法
  axios.defaults.baseURL = '/api'
  axios.defaults.withCredentials = true
  axios.defaults.crossDomain = true
  axios.defaults.headers.post['Content-Type'] = 'application/json'
  axios.defaults.headers.post['Accept'] = 'application/json'
  Vue.prototype.$http = axios
  // 逻辑...
}

export default MyHttpServer